package service.impl;

import Redis.JedisClient;
import org.springframework.stereotype.Service;
import service.RedisService;


@Service("redisService")
public class RedisServiceImpl implements RedisService {

    @Override
    public Object get(String key) throws Exception {
        JedisClient jedisClient=JedisClient.getInstance();
            String result="";
        try {
            result=jedisClient.get(key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    @Override
    public int set(String key, Object value) throws Exception {
        JedisClient jedisClient=JedisClient.getInstance();
        System.out.println(value);
 /*       jedisClient.add(key,value.toString());*/

        return 0;
    }
}
